﻿@page "/demos/simple"
@inherits SimpleComponent
@layout DemoLayout
@inject LayoutData LayoutData

@code {
    protected override void OnInitialized()
    {
        base.OnInitialized();

        LayoutData.Title = "Simple";
        LayoutData.Info = "A simple example of Blazor.Diagrams.";
        LayoutData.DataChanged();
    }
}

<div style="position: absolute; z-index: 9999;">
    <div class="custom-control custom-checkbox ml-2">
        <input id="zoomCheckbox" type="checkbox" class="custom-control-input" @onchange="ToggleZoom" checked />
        <label class="custom-control-label" for="zoomCheckbox">Toggle Zoom</label>
    </div>
    <div class="custom-control custom-checkbox ml-2">
        <input id="panningCheckbox" type="checkbox" class="custom-control-input" @onchange="TogglePanning" checked />
        <label class="custom-control-label" for="panningCheckbox">Toggle Panning</label>
    </div>
    <div class="custom-control custom-checkbox ml-2">
        <input id="virtualizationCheckbox" type="checkbox" class="custom-control-input" @onchange="ToggleVirtualization" checked />
        <label class="custom-control-label" for="virtualizationCheckbox">Toggle Virtualization</label>
    </div>
</div>

<CascadingValue Value="diagram">
    <DiagramCanvas>
        <Widgets>
            <NavigatorWidget Width="300" Height="200" DefaultStyle="true"></NavigatorWidget>
        </Widgets>
    </DiagramCanvas>
</CascadingValue>
